<?php

use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;

class AddIncomeToWaimaiOrderDetails extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::table('waimai_order_details', function (Blueprint $table) {
            $table->unsignedInteger('incomes')->default(0)->comment('单行菜的实收');
            $table->unsignedInteger('incomesDiscount')->default(0)->comment('单行菜实收的优惠');
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::table('waimai_order_details', function (Blueprint $table) {
            $table->dropColumn('incomes');
            $table->dropColumn('incomesDiscount');
        });
    }
}
